<p><%=l('admin', :welcome) %>
<p><%=l('admin', :add)%></p>
<p><% if current_user.regions.collect(&:name).length > 0 %>
<strong>Regions:</strong> <%= current_user.regions.collect(&:name).to_sentence %>
<% else %>
<strong>Superadmins can modify data for all regions.</strong>
<% end %>

<div id="rightContent">
	<div class="contentBox">
		<div class="contentBoxHeader"><%=l('admin', 'recent orders')%></div>
		<div class="itemContainer">
		  <span class="title">Sane Basket</span> by <span class="artist">Joe Schmoe </span><br/>
      Sold: <span class="date">10/24/2009</span>
      <div class="controls"><%=link_to l('common', :view).downcase%></div>
    </div>
    
    <div class="itemContainer">
		  <span class="title">Serape</span> by <span class="artist">Joe Schmoe </span><br/>
      Sold: <span class="date">10/24/2009</span>
      <div class="controls"><%=link_to l('common', :view).downcase%></div>
    </div>
	</div>
	
	<div id="recentWorks" class="contentBox">
		<div class="contentBoxHeader"><%=l('admin', 'recent artwork')%>
			<div class="subHeader">
				<%= link_to l('common', 'create new'), new_admin_artwork_path %>
			</div>
    </div>
    
    <% for artwork in @artworks %>
		<div class="itemContainer">
			<span class="title"><%= artwork.name %></span> by <span class="artist"><%= artwork.artist.fullname %></span><br/>
			Added: <span class="date"><%= artwork.created_at.strftime("%B %d, %Y") %></span>
			<div class="controls">
				<%= link_to l('common', :view).downcase, admin_artwork_path(artwork)%>
				<%= link_to l('common', :edit).downcase, edit_admin_artwork_path(artwork)%>
				<%= link_to l('common', :destroy).downcase, admin_artwork_path(artwork), :confirm => l('common', :confirm), :method => :delete %>
			</div>
		</div>
    <% end %>
	</div>
</div>

<%= render :partial => "admin/artists/index" %>
